<style>
  .btn-default:hover, 
  .btn-default:focus, 
  .btn-default:active, 
  .btn-default.active, 
  .open .dropdown-toggle.btn-default, 
  .btn-default:active:focus, 
  .btn-default:active:hover, 
  .btn-default.active:hover, 
  .btn-default.active:focus{
    background-color: #1888f5;
    border-color: #1888f5;
  }
  .page-heading .col-md-1{
    padding-left: 0;
  }
</style>
<div class="row wrapper white-bg page-heading">
  <div class="container-fluid">
    <h2>留言列表</h2>
  </div>
  <br/>
  <div class="container-fluid">
    <div class="col-md-1 pull-left" style="text-align: left">
      <!--<button ng-if="messageListCtrl.status=='1'" class="btn btn-default" ng-click="messageListCtrl.changeStatus('3')"><i class="fa fa-plus-circle"></i>在线留言</button>
      <button ng-if="messageListCtrl.status=='2'" class="btn btn-default" ng-click="messageListCtrl.changeStatus('3')"><i class="fa fa-plus-circle"></i>在线留言</button>-->
      <!--<button ng-if="messageListCtrl.status=='3'" class="btn btn-primary" ng-click="messageListCtrl.changeStatus('3')"><i class="fa fa-plus-circle"></i>在线留言</button>-->
    </div>
  </div>
  <br>
  <div class="container-fluid">
    <!-- 订购留言列表 -->
    <table class="table table-hover" ng-if="messageListCtrl.status==1">
      <thead>
      <tr>
        <th>姓名</th>
        <th>电话</th>
        <th>主题</th>
        <th>IP</th>
        <th>创建时间</th>
        <th>操作</th>
      </tr>
      </thead>
      <tfoot></tfoot>
      <tbody>
      <tr ng-repeat="item in messageListCtrl.messageList">
        <td>{{item.name}}</td>
        <td>{{item.contactTel}}</td>
        <td>{{item.buyTheme}}</td>
        <td>{{item.IP}}</td>
        <td>{{item.createTime}}</td>
        <td>
          <button class="btn btn-info btn-sm" ui-sref="home.message.messageAdd({messageId:item.boxMessageId,status:messageListCtrl.status})">查看详情</button>
          <button class="btn btn-danger btn-sm" ng-click="messageListCtrl.delete(item.boxMessageId)">删除</button>
        </td>
      </tr>
      </tbody>
    </table>
    <!-- 预约课程列表 -->
    <table class="table table-hover" ng-if="messageListCtrl.status==2">
      <thead>
      <tr>
        <th>孩子姓名</th>
        <th>孩子年龄</th>
        <th>联系电话</th>
        <th>IP</th>
        <th>创建时间</th>
        <th>操作</th>
      </tr>
      </thead>
      <tfoot></tfoot>
      <tbody>
      <tr ng-repeat="item in messageListCtrl.messageList">
        <td>{{item.childrenName}}</td>
        <td>{{item.childrenAge}}</td>
        <td>{{item.contactTel}}</td>
        <td>{{item.IP}}</td>
        <td>{{item.createTime}}</td>
        <td>
          <button class="btn btn-info btn-sm" ui-sref="home.message.messageAdd({messageId:item.subscribeId,status:messageListCtrl.status})">查看详情</button>
          <button class="btn btn-danger btn-sm" ng-click="messageListCtrl.delete(item.subscribeId)">删除</button>
        </td>
      </tr>
      </tbody>
    </table>
    <!-- 在线留言列表 -->
    <table class="table table-hover" ng-if="messageListCtrl.status==3">
      <thead>
        <tr>
          <th>姓名</th>
          <th>电话</th>
          <th>邮箱</th>
          <th>IP</th>
          <th>创建时间</th>
          <th>操作</th>
        </tr>
        </thead>
        <tfoot></tfoot>
        <tbody>
        <tr ng-repeat="item in messageListCtrl.messageList">
          <td>{{item.name}}</td>
          <td>{{item.tel}}</td>
          <td>{{item.email}}</td>
          <td>{{item.IP}}</td>
          <td>{{item.createTime}}</td>
          <td>
            <button class="btn btn-info btn-sm" ui-sref="home.message.messageAdd({messageId:item.onlineMessageId,status:messageListCtrl.status})">查看详情</button>
            <button class="btn btn-danger btn-sm" ng-click="messageListCtrl.delete(item.onlineMessageId)">删除</button>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
  <div class="container-fluid">
    <div class="col-md-12">
      <div class="fenyeBox" ng-show="messageListCtrl.totalNum != 0">
        <div class="pull-left">
          总条数：
          <strong> {{ messageListCtrl.totalNum}} </strong>条，共
          <strong> {{ messageListCtrl.pageResult.totalPage}}</strong>
          页，当前第
          <strong>{{ messageListCtrl.pageNo}}</strong> 页
        </div>
        <div class="pull-right" ng-show="messageListCtrl.pageResult.totalPage > 1">
          <ul class="pagination">
            <li>
              <button class="btn btn-white btn-bitbucket" ng-disabled=" messageListCtrl.pageNo==1"
                      ng-click="messageListCtrl.changePage(1)">
                首页
              </button>
            </li>
            <li>
              <button class="btn btn-white btn-bitbucket" ng-disabled=" messageListCtrl.pageNo==1"
                      ng-click="messageListCtrl.changePage(messageListCtrl.pageNo-1)">
                上一页
              </button>
            </li>
            <li ng-repeat="page in  messageListCtrl.pageResult.pages">
              <button ng-click="messageListCtrl.changePage(page)" class="btn btn-white btn-bitbucket"
                      ng-disabled="messageListCtrl.pageNo == page">{{page}}
              </button>
            </li>
            <li>
              <button class="btn btn-white btn-bitbucket"
                      ng-disabled="messageListCtrl.pageNo== messageListCtrl.pageResult.totalPage"
                      ng-click="messageListCtrl.changePage(messageListCtrl.pageNo+1)">
                下一页
              </button>
            </li>
            <li>
              <button class="btn btn-white btn-bitbucket"
                      ng-disabled="messageListCtrl.pageNo== messageListCtrl.pageResult.totalPage"
                      ng-click="messageListCtrl.changePage(messageListCtrl.pageResult.totalPage)">
                尾页
              </button>
            </li>
          </ul>
        </div>
      </div>
      <p class="text-center" ng-hide=" messageListCtrl.totalNum != 0">查无结果</p>
    </div>
  </div>
</div>
